#!/bin/bash

SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
GAIADIR="$(dirname $SCRIPTDIR)/chain-code/gaia"

[ ! -d "$GAIADIR" ] && echo "Repositry for gaia does not exist at $GAIADIR. Try running 'make get-gaia'..." && exit 1

cd $GAIADIR
echo "Building gaiad binary at branch($(git branch --show-current)) tag($(git describe --tags)) commit($(git rev-parse HEAD))"
make install &> /dev/null
gaiad version --long
